// 扫描此文件夹下面所有的.vue文件，并注册
const vueData = [];
// require.context()   在哪个目录找 2.是否加载子目录 3.加载的文件名（正则匹配）
// const importFn = require.context('@/components/htao-richtext', false, /\.vue$/)
import HtaoRich from './HtaoRich.vue'
import HtaoFlow from './HtaoFlow.vue'
import CompareVersion from './CompareVersion.vue'
export default {
	install (app) {
		// importFn.keys().foreEach(path => {
		// 	const component = importFn(path).default;
		// 	const order = component.order;
		// 	if (!order) {
		// 		order = 1;
		// 	}
		// 	let data = {
		// 		name: component.name,
		// 		order: order,
		// 		title: component.title
		// 	}
		// 	vueData.push(data);
		// 	vueData.sort((a, b) => {return a.order - b.order});
		// 	app.component(component.name, component);
		// })
		app.component('htao-rich', HtaoRich)
		app.component('htao-flow', HtaoFlow)
		app.component('compare-version', CompareVersion)
	},
	datas: vueData
}
